<?php
#□■□■□■□■□■□■□■□■□■□■□
#■ 	- BR ADMINISTRATOR SCRIPT - 	 ■
#□ 									 □
#■ 		  サブルーチン一覧  		 ■
#□ ITEMLIST	-	アイテム一覧		 □
#■□■□■□■□■□■□■□■□■□■□■
#=================#
# ■ アイテム一覧 #
#=================#
function ITEMLIST(){
global $pref;
HEAD();
?>
<center><font color="#FF0000" face="ＭＳ Ｐ明朝" size="6"><span id="BR" style="width:100%;filter:blur(add=1,direction=135,strength=9):glow(strength=5,color=gold); font-weight:700; text-decoration:underline">Administrative Mode</span></font></center>
<TABLE border="1" class="b3">
<?
#Display Area Item
for ($j=0; $j<count($pref['area']); $j++){
	$filename = $pref['LOG_DIR'].'/'.$j.$pref['item_file'];
	$itemlist = @file($filename);
	echo '<TR><TD colspan="12" class="b1"><font size="+2" color="yellow">'.$pref['place'][$j].'</font></TD></TR><TR><TD class="b2">道具名<>种类</TD><TD class="b2">种类</TD><TD class="b2">效果</TD><TD class="b2">数量</TD><TD class="b2">道具名<>种类</TD><TD class="b2">种类</TD><TD class="b2">效果</TD><TD class="b2">数量</TD><TD class="b2">道具名<>种类</TD><TD class="b2">种类</TD><TD class="b2">效果</TD><TD class="b2">数量</TD></TR>';
	for ($i=0;$i<count($itemlist);$i+=3){
		itemtype($itemlist[$i],1,$i);
		if(isset($itemlist[$i+1])){itemtype($itemlist[$i+1],2,$i);}
		if(isset($itemlist[$i+2])){itemtype($itemlist[$i+2],3,$i);}
	}
}
?>
</TABLE>
<BR>
<?
FOOTER();
}
#=================#
# ■ アイテム种类 #
#=================#
function itemtype($itemlist,$table){
global $item,$i;
list($w_i,$w_e,$w_t) = explode(',',$itemlist);
list($i_name,$i_kind) = split('<>',$w_i);
if(preg_match("/HH|HD/",$i_kind)){$itemtype = "【生命回复】";}
elseif(preg_match("/SH|SD/",$i_kind)){$itemtype = "【体力回复】";}
elseif($i_kind == "TN"){$itemtype = "【陷阱】";}
elseif(preg_match("/W/",$i_kind)){$itemtype = "【武器";
	if(preg_match("/G/",$i_kind))	{$itemtype = ($itemtype . "(射)");}
	if(preg_match("/S/",$i_kind))	{$itemtype = ($itemtype . "(消音)");}
	if(preg_match("/K/",$i_kind))	{$itemtype = ($itemtype . "(斩)");}
	if(preg_match("/C/",$i_kind))	{$itemtype = ($itemtype . "(投)");}
	if(preg_match("/B/",$i_kind))	{$itemtype = ($itemtype . "(殴)");}
	if(preg_match("/D/",$i_kind))	{$itemtype = ($itemtype . "(爆)");}
	$itemtype = ($itemtype . "】");}
elseif(preg_match("/D/",$i_kind))	{$itemtype = "【防具";
	if(preg_match("/B/",$i_kind))	{$itemtype = ($itemtype . "(体)");}
	if(preg_match("/H/",$i_kind))	{$itemtype = ($itemtype . "(头)");}
	if(preg_match("/F/",$i_kind))	{$itemtype = ($itemtype . "(足)");}
	if(preg_match("/A/",$i_kind))	{$itemtype = ($itemtype . "(腕)");}
	$itemtype = ($itemtype . "】");}
elseif(($i_kind == 'R1')||($i_kind == 'R2')){$itemtype = "【雷达】";}
elseif($i_kind == 'Y'){
	if(($i_name == "腐烂的滋味酱")||($i_name == "滋味酱")){$itemtype = "【滋味酱】";}
	elseif($i_name == "【子弹】"){$itemtype = "【弹】";}
	else{$itemtype = "【道具】";}}
elseif($i_kind == 'A'){$itemtype = "【装飾品】";}
elseif($item[$i] == "无"){$itemtype = "【无】";}
else{$itemtype = "【不明】";}
if($table == 1){
	print "<TR><TD class=\"b3\">$w_i</TD><TD><font color=\"00ffff\">$itemtype</font></TD><TD class=\"b3\">$w_e</TD><TD class=\"b3\">$w_t</TD>";
}elseif($table == 2){
	print "<TD class=\"b3\">$w_i</TD><TD><font color=\"00ffff\">$itemtype</font></TD><TD class=\"b3\">$w_e</TD><TD class=\"b3\">$w_t</TD>";
}elseif($table == 3){
	print "<TD class=\"b3\">$w_i</TD><TD><font color=\"00ffff\">$itemtype</font></TD><TD class=\"b3\">$w_e</TD><TD class=\"b3\">$w_t</TD></TR>";
}

}
?>